﻿using System;
using System.Collections.Generic;
using System.Text;

namespace com.dz.ct.common
{
    public class Consts
    {
        /// <summary>
        /// 失败
        /// </summary>
        public static int Faild = -1;


        /// <summary>
        /// 成功
        /// </summary>
        public static int Success = 1;

        /// <summary>
        /// 站点
        /// </summary>
        public enum Site
        {
            /// <summary>
            /// 起点
            /// </summary>
            qidian = 1,
            /// <summary>
            /// 起点女生频道
            /// </summary>
            qdmm=2,
            /// <summary>
            /// 晋江文学城
            /// </summary>
            jjwxc=3,
            /// <summary>
            /// 17k小说
            /// </summary>
            yqk=4,
            /// <summary>
            /// 小说阅读
            /// </summary>
            readnovel=5,
            /// <summary>
            /// 来文学小说网
            /// </summary>
            laiwx=6,
            /// <summary>
            /// 闪舞小说
            /// </summary>
            swxs=7,
            /// <summary>
            /// 千载中文网
            /// </summary>
            qianzai=8
        }

        /// <summary>
        /// 站点列表
        /// </summary>
        /// <returns></returns>
        private static Dictionary<int, string> GetSiteList()
        {
            Dictionary<int, string> t_dic = new Dictionary<int, string>();

            t_dic.Add(1, "qidian");
            t_dic.Add(2, "qdmm");
            t_dic.Add(3, "jjwxc");
            t_dic.Add(4, "yqk");
            t_dic.Add(5, "readnovel");
            t_dic.Add(6, "laiwx");
            t_dic.Add(7, "swxs");
            t_dic.Add(8, "qianzai");
            return t_dic;
        }

        /// <summary>
        /// 获取章节表名
        /// </summary>
        /// <param name="i_site_id"></param>
        /// <returns></returns>
        public static string GetTableName(int i_site_id)
        {
            Dictionary<int, string> t_dic = GetSiteList();

            if (t_dic.ContainsKey(i_site_id))
                return t_dic[i_site_id];

            return string.Empty;
        }


        public static DateTime MinValue = new DateTime(1954, 1, 1);

        public static DateTime MaxValue = new DateTime(9999, 1, 1);

        /// <summary>
        /// vip错误类型
        /// </summary>
        public enum VipErrorType
        {
                UrlError=1,
                VIPRegError=2,
                NotVIPChapter=3
        }

    }
}
